package com.easyweb.session;

 

import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.framework.EntityQuery;
import java.util.*;

import javax.persistence.EntityManager;

import com.easyweb.entity.Bayi;
import com.easyweb.entity.FakulteTanimlari;
import com.easyweb.entity.Iller;
import com.easyweb.entity.UniversiteTanimlari;
 
@Name("fakulteTanimlariList")
public class FakulteTanimlariList extends EntityQuery<FakulteTanimlari> {

	@In EntityManager entityManager;
	private static final String EJBQL = "select fakulteTanimlari from fakulteTanimlari select fakulteTanimlari";
	private List<FakulteTanimlari> fakulteList=null;
	
	private static final String[] RESTRICTIONS = {
			"lower(fakulteTanimlari.adi) like lower(concat(#{fakulteTanimlariList.fakulte.adi},'%'))",
			 };

	private FakulteTanimlari fakulte = new FakulteTanimlari();

	public void fakulteListesiOlustur(){
		fakulteList=new ArrayList<FakulteTanimlari>();
	 	fakulteList=entityManager.createNamedQuery("fakulteTumKayitlar").getResultList();
		
	}

	
	public FakulteTanimlariList() {
		setEjbql(EJBQL);
		setRestrictionExpressionStrings(Arrays.asList(RESTRICTIONS));
		setMaxResults(25);
	}


	public FakulteTanimlari getfakulte() {
		return fakulte;
	}
	
	public void setfakulte(FakulteTanimlari fakulte) {
		this.fakulte = fakulte;
	}

	public List<FakulteTanimlari> getfakulteList() {
		return fakulteList;
	}

	public void setfakulteList(List<FakulteTanimlari> fakulteList) {
		this.fakulteList = fakulteList;
	}
	
 
	 
	 
 
}
